<?php
	include "../public/commom/config.php";
	include "../public/commom/commom.php";
	
	if($_POST) {
		$shop_id = $_POST["shop_id"];
		
		$content = $_POST["content"];
		$user_id = $_SESSION["user_id"];
		$time = time();
		
		$sql = "INSERT INTO leaveword (content, time, user_id, shop_id) VALUES ('$content', '$time', '$user_id', '$shop_id')";
		
		$result = mysqli_query($conn, $sql);
		
		mysqli_close($conn);
		
		header("Location: ./shopdetails.php?shop_id=$shop_id");
	}
?>